package xps.and.uudaijia.userclient.data.net;


import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import xps.and.uudaijia.userclient.data.baen.AliPrePayOrder;
import xps.and.uudaijia.userclient.data.baen.CodeBean;
import xps.and.uudaijia.userclient.data.baen.PrePayOrder;
import xps.and.uudaijia.userclient.data.serviceapi.PayApi;

public class PayNetWork extends RetrofitUtils {
    protected static final PayApi payApi = RetrofitUtils.getPayApi();

    public static void perPay(String orderId, Subscriber<PrePayOrder> observer) {
        payApi.preOrder(orderId).subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(observer);
    }

    public static void ZFBCont(String orderId, Subscriber<AliPrePayOrder> observer) {
        payApi.ZFBCont(orderId).subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(observer);
    }

    public static void YECont(String orderId, Subscriber<CodeBean> observer) {
        payApi.YECont(orderId).subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(observer);
    }
    public static void XJCont(String orderId, Subscriber<CodeBean> observer) {
        payApi.XJCont(orderId).subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(observer);
    }
}
